# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-sys-mmap
_realname=Sys-Mmap
pkgver=0.20
pkgrel=5
pkgdesc="Uses mmap to map in a file as a Perl variable"
url="https://metacpan.org/pod/Sys::Mmap"
arch="all"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/T/TO/TODDR/Sys-Mmap-$pkgver.tar.gz"
builddir="$srcdir/Sys-Mmap-$pkgver"

build() {
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	# creates file collision among perl modules
	find "$pkgdir" -name perllocal.pod -delete
}
sha512sums="7afe9e1be26d75bbc818d3deb51e0ba751c2711f8503a77882d3d207b1c37e4867fe79e5757193ba058ed395ba955406d8af3f195ce5dff5b4b29748d9d86f5f  Sys-Mmap-0.20.tar.gz"
